package com.ylr.template;

import org.springframework.context.ApplicationContext;

import javax.annotation.Resource;

/**
 * @author ylr
 * @version 1.0.0
 * @ClassName TemplateFactory.java
 * @Description 模板工厂
 * @createTime 2022年01月08日 14:02:00
 */
public class TemplateFactory <T>{


    public static <T> T getTemplateBean(String beanName){
        T template = (T)ApplicationUtil.getApplicationContext().getBean(beanName);
        return template;
    }
}
